<?php
define('root',$_SERVER['DOCUMENT_ROOT']);
require(root."/ecsac-tic-apps-extranet/web-util/mailer/PHPMailer_v5.1/class.phpmailer.php");
require(root."/ecsac-tic-apps-extranet/web-util/mailer/PHPMailer_v5.1/class.pop3.php");

$pop = new POP3();
$pop->Authorise('192.168.10.2', 110, 30, 'cperalta', '360811544', 1);

$mail = new PHPMailer(true);

$mail->IsSMTP();

try{
	
	$mail->SMTPDebug = 2;
	$mail->Host = '192.168.10.2';
	//$mail->AddReplyTo('cperalta@frigoaesa.com.pe');
	$mail->SetFrom('cperalta@frigoaesa.com.pe');
	$mail->AddAddress('cperalta@frigoaesa.com.pe');
	//$mail->AddAddress('lramirez@frigoaesa.com.pe');
	
	
	$mail->Subject = 'prueba';
	$mail->AltBody = 'descripcion del mensaje'; //este mensaje aparece en la descripcion de la notificacion
	$mail->MsgHTML(file_get_contents('test-emailing-content.html'));
	$mail->AddAttachment('temp/foot.php');
	//$mail->AddAttachment('images/ico-spi.gif');
	$mail->Send();
	
	echo "Message Sent OK<p></p>\n";
	
}catch (phpmailerException $e) {
	
	echo $e->errorMessage();
	
}catch (Exception $e) {
	
	echo $e->getMessage();
	
}

?>